/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

iot-card-Related-API
物联网卡服务相关API

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKIotcard/IotcardApiModel.h>


@implementation IotcardOpenIotCardRequest
-(id) initWithRegion:(NSString *)regionId
iccids:(NSArray<NSString*>*)iccids { 
    self.regionId = regionId;
    self.iccids = iccids;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
iccids:(NSArray<NSString*>*)iccids { 
    self.regionId = regionId;
    self.version = version;
    self.iccids = iccids;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self iccids])
    {
        [result setValue:[self iccids] forKey:@"iccids"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.iccids = [dictionary objectForKey:@"iccids"];
    return self;
} 

@end
@implementation IotcardLifeStatusRequest
-(id) initWithRegion:(NSString *)regionId
iccid:(NSString*)iccid { 
    self.regionId = regionId;
    self.iccid = iccid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
iccid:(NSString*)iccid { 
    self.regionId = regionId;
    self.version = version;
    self.iccid = iccid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self iccid])
    {
        [result setValue:[self iccid] forKey:@"iccid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.iccid = [dictionary objectForKey:@"iccid"];
    return self;
} 

@end
@implementation IotcardOnOffStatusRequest
-(id) initWithRegion:(NSString *)regionId
iccid:(NSString*)iccid { 
    self.regionId = regionId;
    self.iccid = iccid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
iccid:(NSString*)iccid { 
    self.regionId = regionId;
    self.version = version;
    self.iccid = iccid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self iccid])
    {
        [result setValue:[self iccid] forKey:@"iccid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.iccid = [dictionary objectForKey:@"iccid"];
    return self;
} 

@end
@implementation IotcardCloseIotFlowRequest
-(id) initWithRegion:(NSString *)regionId
iccids:(NSArray<NSString*>*)iccids { 
    self.regionId = regionId;
    self.iccids = iccids;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
iccids:(NSArray<NSString*>*)iccids { 
    self.regionId = regionId;
    self.version = version;
    self.iccids = iccids;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self iccids])
    {
        [result setValue:[self iccids] forKey:@"iccids"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.iccids = [dictionary objectForKey:@"iccids"];
    return self;
} 

@end
@implementation IotcardOpenIotFlowRequest
-(id) initWithRegion:(NSString *)regionId
iccids:(NSArray<NSString*>*)iccids { 
    self.regionId = regionId;
    self.iccids = iccids;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
iccids:(NSArray<NSString*>*)iccids { 
    self.regionId = regionId;
    self.version = version;
    self.iccids = iccids;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self iccids])
    {
        [result setValue:[self iccids] forKey:@"iccids"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.iccids = [dictionary objectForKey:@"iccids"];
    return self;
} 

@end
@implementation IotcardGprsRealtimeInfoRequest
-(id) initWithRegion:(NSString *)regionId
iccid:(NSString*)iccid { 
    self.regionId = regionId;
    self.iccid = iccid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
iccid:(NSString*)iccid { 
    self.regionId = regionId;
    self.version = version;
    self.iccid = iccid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self iccid])
    {
        [result setValue:[self iccid] forKey:@"iccid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.iccid = [dictionary objectForKey:@"iccid"];
    return self;
} 

@end
@implementation IotcardGprsStatusRequest
-(id) initWithRegion:(NSString *)regionId
iccid:(NSString*)iccid { 
    self.regionId = regionId;
    self.iccid = iccid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
iccid:(NSString*)iccid { 
    self.regionId = regionId;
    self.version = version;
    self.iccid = iccid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self iccid])
    {
        [result setValue:[self iccid] forKey:@"iccid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.iccid = [dictionary objectForKey:@"iccid"];
    return self;
} 

@end
@implementation IotcardCloseIotCardRequest
-(id) initWithRegion:(NSString *)regionId
iccids:(NSArray<NSString*>*)iccids { 
    self.regionId = regionId;
    self.iccids = iccids;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
iccids:(NSArray<NSString*>*)iccids { 
    self.regionId = regionId;
    self.version = version;
    self.iccids = iccids;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self iccids])
    {
        [result setValue:[self iccids] forKey:@"iccids"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.iccids = [dictionary objectForKey:@"iccids"];
    return self;
} 

@end
@implementation IotcardGprsRealtimeInfoResult
-(id) initWithStatus:(NSString*) status
        message:(NSString*)message
        result:(GprsRealtimeInfoResp*)result { 
    self.status = status;               
    self.message = message;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self result])
    {
        [result setValue:[[self result] dictionary]forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.message = [dictionary objectForKey:@"message"];
    self.result = [[GprsRealtimeInfoResp alloc]initWithDic:[dictionary objectForKey:@"result"]];
    return self;
} 

@end
  
@implementation IotcardGprsRealtimeInfoResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IotcardGprsRealtimeInfoResult* result = [[IotcardGprsRealtimeInfoResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IotcardGprsRealtimeInfoResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IotcardCloseIotFlowResult
-(id) initWithStatus:(NSString*) status
        message:(NSString*)message
        result:(NSArray<OperationIotCardResp*>*)result { 
    self.status = status;               
    self.message = message;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self result])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self result] count]; i++) {
            OperationIotCardResp* item = [[self result] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.message = [dictionary objectForKey:@"message"];
    NSArray* resultArray = [dictionary objectForKey:@"result"];
    if(resultArray&&![resultArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resultArray count];i++)
        {
        OperationIotCardResp* item = [[OperationIotCardResp alloc]initWithDic:[resultArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.result = propertyArray;
    }
    return self;
} 

@end
  
@implementation IotcardCloseIotFlowResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IotcardCloseIotFlowResult* result = [[IotcardCloseIotFlowResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IotcardCloseIotFlowResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IotcardLifeStatusResult
-(id) initWithStatus:(NSString*) status
        message:(NSString*)message
        result:(LifeStatusResp*)result { 
    self.status = status;               
    self.message = message;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self result])
    {
        [result setValue:[[self result] dictionary]forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.message = [dictionary objectForKey:@"message"];
    self.result = [[LifeStatusResp alloc]initWithDic:[dictionary objectForKey:@"result"]];
    return self;
} 

@end
@implementation IotcardCloseIotCardResult
-(id) initWithStatus:(NSString*) status
        message:(NSString*)message
        result:(NSArray<OperationIotCardResp*>*)result { 
    self.status = status;               
    self.message = message;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self result])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self result] count]; i++) {
            OperationIotCardResp* item = [[self result] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.message = [dictionary objectForKey:@"message"];
    NSArray* resultArray = [dictionary objectForKey:@"result"];
    if(resultArray&&![resultArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resultArray count];i++)
        {
        OperationIotCardResp* item = [[OperationIotCardResp alloc]initWithDic:[resultArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.result = propertyArray;
    }
    return self;
} 

@end
  
@implementation IotcardCloseIotCardResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IotcardCloseIotCardResult* result = [[IotcardCloseIotCardResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IotcardCloseIotCardResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IotcardGprsStatusResult
-(id) initWithStatus:(NSString*) status
        message:(NSString*)message
        result:(GprsStatusResp*)result { 
    self.status = status;               
    self.message = message;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self result])
    {
        [result setValue:[[self result] dictionary]forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.message = [dictionary objectForKey:@"message"];
    self.result = [[GprsStatusResp alloc]initWithDic:[dictionary objectForKey:@"result"]];
    return self;
} 

@end
  
@implementation IotcardGprsStatusResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IotcardGprsStatusResult* result = [[IotcardGprsStatusResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IotcardGprsStatusResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IotcardOpenIotCardResult
-(id) initWithStatus:(NSString*) status
        message:(NSString*)message
        result:(NSArray<OperationIotCardResp*>*)result { 
    self.status = status;               
    self.message = message;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self result])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self result] count]; i++) {
            OperationIotCardResp* item = [[self result] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.message = [dictionary objectForKey:@"message"];
    NSArray* resultArray = [dictionary objectForKey:@"result"];
    if(resultArray&&![resultArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resultArray count];i++)
        {
        OperationIotCardResp* item = [[OperationIotCardResp alloc]initWithDic:[resultArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.result = propertyArray;
    }
    return self;
} 

@end
@implementation IotcardOnOffStatusResult
-(id) initWithStatus:(NSString*) status
        message:(NSString*)message
        result:(OnOffStatusResp*)result { 
    self.status = status;               
    self.message = message;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self result])
    {
        [result setValue:[[self result] dictionary]forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.message = [dictionary objectForKey:@"message"];
    self.result = [[OnOffStatusResp alloc]initWithDic:[dictionary objectForKey:@"result"]];
    return self;
} 

@end
  
@implementation IotcardLifeStatusResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IotcardLifeStatusResult* result = [[IotcardLifeStatusResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IotcardLifeStatusResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation IotcardOpenIotCardResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IotcardOpenIotCardResult* result = [[IotcardOpenIotCardResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IotcardOpenIotCardResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IotcardOpenIotFlowResult
-(id) initWithStatus:(NSString*) status
        message:(NSString*)message
        result:(NSArray<OperationIotCardResp*>*)result { 
    self.status = status;               
    self.message = message;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self result])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self result] count]; i++) {
            OperationIotCardResp* item = [[self result] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.message = [dictionary objectForKey:@"message"];
    NSArray* resultArray = [dictionary objectForKey:@"result"];
    if(resultArray&&![resultArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resultArray count];i++)
        {
        OperationIotCardResp* item = [[OperationIotCardResp alloc]initWithDic:[resultArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.result = propertyArray;
    }
    return self;
} 

@end
  
@implementation IotcardOpenIotFlowResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IotcardOpenIotFlowResult* result = [[IotcardOpenIotFlowResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IotcardOpenIotFlowResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation IotcardOnOffStatusResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IotcardOnOffStatusResult* result = [[IotcardOnOffStatusResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IotcardOnOffStatusResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
